/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:龙宝
 * Date:2023-11-26
 * Time:9:40
 */
class Arr {
    //数组
    public Object[] arr = new Object[10];
    //获取数据
    public Object getPos(int pos) {
        return arr[pos];
    }
    //设置某位置上的数据
    public void setVal(int pos,Object val){
        this.arr[pos] = val;
    }
}
public class test1 {
    public static void main(String[] args) {
        Arr arr = new Arr();
        arr.setVal(0,10);
        arr.setVal(1,"hhh");
        Integer ret1 = (Integer) arr.getPos(0);
        String ret2 = (String) arr.getPos(1);

    }

}
